/* ======================================== */
/* CSS for control sap.ui.unified/Calendar  */
/* Base theme                               */
/* ======================================== */

.sapUiCal {
	background: none repeat scroll 0 0 @sapUiListBackground;
	overflow: hidden;
	position: relative;
	outline: none;
	display: inline-block;
	white-space: initial; /* To not inherit */
	box-sizing: border-box;
	text-align: center;
	padding: 1rem 0.5rem 0 0.5rem;
}

.sapUiCalInt {
	box-sizing: border-box;
}

/* calendar should have only a border if on popup */
.sapUiCal.sapUiShd {
	border: 0.0625rem solid @sapUiContentForegroundBorderColor;
	width: 20.125rem;
}

/*** HEADER ***/
.sapUiCalHead {
	width: 100%;
	position: relative;
	text-align:center;
	display: inline-block;
	height: 2.5rem;
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
	background-color: @sapUiListBackground;
}

.sapUiCal:not(.sapUiCalInt) > .sapUiCalHead {
	max-width: 40rem;
}

.sapUiCalHead > button,
.sapUiCalCancel {
	background-color: @sapUiButtonLiteBackground;
	border: none;
	color: @sapUiButtonTextColor;
	cursor: pointer;
	overflow: hidden;
	white-space: nowrap;
	height: 2.5rem;
	padding: 0;
	font-size: @sapMFontMediumSize;
}

.sapUiCalHeadB {
	vertical-align: top;
	width: 5.75rem;
}

.sapUiCalHeadBAddText {
	width: 100%;
	float: left;
	color: @sapUiContentLabelColor;
	font-size: 0.625rem;
}

.sapUiCalHeadPrev,
.sapUiCalHeadNext {
	position: absolute;
	width: 2.5rem;
}

.sapUiCalHeadPrev {
	left: 0.5rem;
}

.sapUiCalHeadNext {
	right: 0.5rem;
}

/* no default (browser) outline, if device needs focus visualization its defined later */
.sapUiCalHead > button:focus,
.sapUiCalCancel:focus {
	outline: none;
}

/* hover and focus makes only sense on desktops. On mobile devices it's not needed */
html.sap-desktop .sapUiCalHead > button:focus,
html.sap-desktop .sapUiCalCancel:focus {
	background-color: @sapUiButtonHoverBackground;
	color: @sapUiButtonHoverTextColor;
}

html.sap-desktop .sapUiCalHead > button:hover,
html.sap-desktop .sapUiCalCancel:hover {
	background-color: @sapUiButtonHoverBackground;
	color: @sapUiButtonHoverTextColor;
}

/* once for desktop to overwrite focus and once for all devices needed */
.sapUiCalHead > button:active,
.sapUiCalCancel:active,
html.sap-desktop .sapUiCalHead > button:active,
html.sap-desktop .sapUiCalHead > button:active > .sapUiCalHeadBAddText,
html.sap-desktop .sapUiCalCancel:active {
	background-color: @sapUiButtonActiveBackground;
	color: @sapUiButtonActiveTextColor;
}

.sapUiCalHead > button.sapUiCalDsbl {
	cursor: default;
	opacity: .3;
	filter: alpha(opacity=30);
}

html.sap-desktop .sapUiCalHead > button.sapUiCalDsbl:focus,
.sapUiCalHead > button.sapUiCalDsbl:hover,
.sapUiCalHead > button.sapUiCalDsbl:active {
	background-color: @sapUiButtonLiteBackground;
	color: @sapUiButtonTextColor;
}

/*** days, months, years ***/
.sapUiCalMonthView {
	vertical-align: top;
}

.sapUiCalMonthView,
.sapUiCalMonthPicker,
.sapUiCalYearPicker {
	width: 14em;
	display: inline-block;
	width: 18rem; /* +1rem padding left and right = 320 px*/
}

.sapUiCalMonthView,
.sapUiCalMonthPicker,
.sapUiCalYearPicker,
.sapUiCalRow {
	background-color: @sapUiListBackground;
}

.sapUiCal .sapUiCalMonthView,
.sapUiCal .sapUiCalRow {
	box-sizing: border-box;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	padding-bottom: 1rem;
}

.sapUiCalInt > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiCalInt > .sapUiCalContent > .sapUiCalYearPicker {
	width: auto;
}

.sapUiCalHeadText {
	text-align: center;
	height: 2rem;
	line-height: 2rem;
	color: @sapUiCalendarColorToday;
}

.sapUiCalContentSingle .sapUiCalHeadText {
	text-align: left;
	margin-left: 12.5%;
}

.sapUiCalRow .sapUiCalHeadText {
	float: left;
	text-align: left;
	overflow: hidden;
	text-overflow: ellipsis;
	whitespace: nowrap;
}

.sapUiCalRow div > .sapUiCalHeadText:last-child {
	float: none; /* if not set, in IE the item line is displayed in the same line */
}

.sapUiCalItems{
	display: inline-block;
	width: 100%;
	white-space: nowrap;
}

.sapUiCalWH,
.sapUiCalItem{
	display: block;
	float: left;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	cursor: default;
	text-align: center;
	overflow: hidden;
	white-space: nowrap;
	box-sizing: border-box;
}

.sapUiCalMonthView .sapUiCalWH,
.sapUiCalMonthView .sapUiCalItem{
	width: 12.5%;
}

.sapUiCalMonthView.sapUiCalNoWeekNum .sapUiCalWH,
.sapUiCalMonthView.sapUiCalNoWeekNum .sapUiCalItem{
	width: 14.2857%;
}

.sapUiCalItemText{
	width: 100%;
	height: 100%;
	display: inline-block;
	box-sizing: border-box;
}

.sapUiCalItem,
.sapUiCalWeekNum{
	height: 3rem;
	line-height: 2.875rem;
	font-size: @sapMFontMediumSize;
}

.sapUiCalWeekNum{
	position: absolute;
	right: 100%;
	width: 100%;
	color: @sapUiContentLabelColor;
	font-size: @sapUiFontSmallSize;
	cursor: default;
	pointer-events: none;
	top: -0.0625rem;
}

.sapUiCalWH{
	color: @sapUiContentLabelColor;
	white-space: nowrap;
	height: 2rem;
	line-height: 1.875rem;
	font-size: @sapMFontSmallSize;
}

.sapUiCalItem{
	color: @sapUiBaseText;
	background-color: lighten(@sapUiContentForegroundColor,5);
}

.sapUiCalItemDsbl{
	color: fade(@sapUiBaseText, 50);
	background-color: fade(lighten(@sapUiContentForegroundColor,5), 50);
}

html.sap-desktop .sapUiCalItem:focus{
	background-color: darken(@sapUiContentForegroundColor,5);
}

.sapUiCalMonthView .sapUiCalFirstWDay{
	clear: both;
	margin-left: 12.5%;
	position: relative;
	overflow: visible;
}

.sapUiCalMonthView.sapUiCalNoWeekNum .sapUiCalFirstWDay{
	margin-left: 0;
}

.sapUiCalItemOtherMonth{
	color: @sapUiContentDisabledTextColor;
}

.sapUiCalItemNow{
	color: @sapUiHighlight;
}

.sapUiCalItemWeekEnd{
	background-color: @sapUiContentForegroundColor;
}

.sapUiCalItemWeekEnd.sapUiCalItemDsbl{
	background-color: fade(@sapUiContentForegroundColor, 50);
}

.sapUiCalItemSel{
	background-color: @sapUiSelected;
}

.sapUiCalContent{
	position: relative;
	text-align: center;
}

.sapUiCalContentOver{
	background-color: @sapUiBlockLayerBackground;
	opacity: 0.15;
	filter: alpha(opacity=60);
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	position: absolute;
	outline: 0 none;
}

.sapUiCalContent > .sapUiCalMonthPicker,
.sapUiCalContent > .sapUiCalYearPicker,
.sapUiCalTimeInt > .sapUiCalContent > .sapUiCalDatesRow{
	position: absolute;
	top: @sapUiLineHeight;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: @sapUiListBackground;
}

.sapUiCalTimeInt > .sapUiCalContent > .sapUiCalDatesRow .sapUiCalWH{
	display: none;
}

/* Day names inside day */
.sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem {
	position: relative;
}

.sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem > .sapUiCalDayName{
	position: absolute;
	top: 0;
	right: 0;
	height: 33%;
	width: 100%;
	color: @sapUiContentLabelColor;
	overflow: hidden;
	white-space: nowrap;
	line-height: 100%;
}

.sapUiCalItemTextAmPm{
	font-size: @sapUiFontSmallSize;
	vertical-align: top;
}

.sapUiCalCancel{
	display: none; /* cancel button only visible on phones */
	position: absolute;
}

/* 2 calendar types */
.sapUiCalMonthSecType > .sapUiCalItems .sapUiCalItem {
	position: relative;
}

.sapUiCalMonthSecType > .sapUiCalItems .sapUiCalItem > .sapUiCalItemSecText{
	position: absolute;
	bottom: 0;
	right: 0;
	height: 33%;
	width: 50%;
	color: @sapUiContentLabelColor;
	overflow: hidden;
	white-space: nowrap;
	line-height: 100%;
}

/* Day, Month and YearPicker on popup */
.sapUiCalMonthView[data-sap-ui-popup],
.sapUiCalMonthPicker[data-sap-ui-popup],
.sapUiCalYearPicker[data-sap-ui-popup]{
	padding: 1rem;
}

/* tablet(large) size is default */

.sapUiCal:not(.sapUiCalInt){
	width: 20rem;
	min-width: 20rem;
}

.sapUiCalMulti:not(.sapUiCalInt){
	width: 39rem; /* to display 2 months side by side as default */
}

/* calendar should have only a border if on popup */
.sapUiCal[data-sap-ui-popup]{
	box-shadow: @sapUiShadowLevel2;
}

html.sapUiMedia-Std-Phone .sapUiCalHeadB0{
	width: 3rem; /* do not overflow buttons on phone */
}

.sapUiCalHeadBFirst{
	margin-right: 0.25rem;
}

.sapUiCalHeadBLast{
	margin-left: 0.25rem;
}

.sapUiCalMulti .sapUiCalHeadB1,
.sapUiCalIntLarge .sapUiCalHeadB1,
.sapUiCalMonthInt .sapUiCalHeadB2{
	width: 12.5rem;
}

.sapUiCalItemNow > .sapUiCalItemText{
	border: 0.125rem solid @sapUiCalendarColorToday;
}

.sapUiCalContent > .sapUiCalMonthPicker,
.sapUiCalContent > .sapUiCalYearPicker{
	top: 0;
	padding: 2rem 0.5rem 1rem 0.5rem;
	background-color: @sapUiListBackground;
	left: 50%;
	margin-left: -9.5rem; /* to position in the middle (for multi-month) */
}

.sapUiCalInt > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiCalInt > .sapUiCalContent > .sapUiCalYearPicker{
	margin-left: 0;
	left: 0;
	padding-bottom: 0;
}

.sapUiCalTimeInt > .sapUiCalContent > .sapUiCalDatesRow{
	top: 0;
	padding: 0 0.5rem 0 0.5rem;
	margin: 0;
}

.sapUiCalTimeInt > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiCalTimeInt > .sapUiCalContent > .sapUiCalYearPicker,
.sapUiCalMonthInt > .sapUiCalContent > .sapUiCalYearPicker{
	padding-top: 0;
}

.sapUiCalInt.sapUiCalIntHead > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiCalInt.sapUiCalIntHead > .sapUiCalContent > .sapUiCalYearPicker{
	padding-top: 4rem;
}

.sapUiCalTimeInt.sapUiCalIntHead > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiCalTimeInt.sapUiCalIntHead > .sapUiCalContent > .sapUiCalYearPicker,
.sapUiCalTimeInt.sapUiCalIntHead > .sapUiCalContent > .sapUiCalDatesRow,
.sapUiCalMonthInt.sapUiCalIntHead > .sapUiCalContent > .sapUiCalYearPicker{
	padding-top: 2rem;
}

.sapUiCalWidth:not(.sapUiCalInt) > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiCalWidth:not(.sapUiCalInt) > .sapUiCalContent > .sapUiCalYearPicker,
.sapUiCalMulti > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiCalMulti > .sapUiCalContent > .sapUiCalYearPicker{
	top: 1rem;
	bottom: auto;
	padding: 1rem;
	margin-left: -10rem;
}

.sapUiCalContent > .sapUiCalYearPicker.sapUiCalYearNoTop{
	padding-top: 0;
}

.sapUiCalWidth:not(.sapUiCalInt) > .sapUiCalContent > .sapUiCalYearPicker.sapUiCalYearNoTop{
	top: 0;
}

/* Day names inside day */
.sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem > .sapUiCalItemText{
	padding-top: 1rem;
	line-height: 2rem;
}

.sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem.sapUiCalItemNow > .sapUiCalItemText{
	line-height: 1.85rem;
}

.sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem > .sapUiCalDayName{
	line-height: 1rem;
	height: 1rem;
	font-size: 0.75rem;
	color: @sapUiContentLabelColor;
	padding-top: 0.375rem;
}

.sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem.sapUiCalItemSel:not(.sapUiCalItemSelBetween) > .sapUiCalDayName{
	color: @sapUiContentContrastTextColor;
}

.sapUiCalItemTextAmPm{
	line-height: 2.8rem;
	font-size: 0.625rem;
}

/* 2 calendar types */
.sapUiCalMonthSecType > .sapUiCalItems .sapUiCalItem  > .sapUiCalItemText{
	line-height: 2.125rem;
	vertical-align: top;
}

.sapUiCalMonthSecType > .sapUiCalItems .sapUiCalItem > .sapUiCalItemSecText{
	font-size: 0.625rem;
	height: 1rem;
	line-height: 1rem;
	padding-right: 0.313rem;
	padding-bottom: 0.313rem;
	box-sizing: border-box;
}

.sapUiCalMonthSecType > .sapUiCalItems .sapUiCalItem.sapUiCalItemSel:not(.sapUiCalItemSelBetween) > .sapUiCalItemSecText{
	color: @sapUiContentContrastTextColor;
}

/*** compact mode (desktop size) ***/

.sapUiSizeCompact .sapUiCal,
.sapUiSizeCompact.sapUiCal{
	padding: 0.5rem 0.25rem 0 0.25rem;
}

.sapUiSizeCompact .sapUiCal:not(.sapUiCalInt),
.sapUiSizeCompact.sapUiCal:not(.sapUiCalInt){
	width: 17rem;
	min-width: 17rem;
}

.sapUiSizeCompact .sapUiCal.sapUiShd,
.sapUiSizeCompact.sapUiCal.sapUiShd{
	width: 17.125rem;
}

.sapUiSizeCompact .sapUiCalMulti:not(.sapUiCalInt),
.sapUiSizeCompact.sapUiCalMulti:not(.sapUiCalInt){
	width: 33.5rem; /* to display 2 months side by side as default */
}

.sapUiSizeCompact .sapUiCalHead{
	height: 2rem;
	padding: 0;
}

.sapUiSizeCompact .sapUiCalHead > button{
	height: 2rem;
}

.sapUiSizeCompact .sapUiCalMonthView,
.sapUiSizeCompact .sapUiCalMonthPicker,
.sapUiSizeCompact .sapUiCalYearPicker{
	width: 16rem;
}

.sapUiSizeCompact .sapUiCal .sapUiCalMonthView,
.sapUiSizeCompact.sapUiCal .sapUiCalMonthView,
.sapUiSizeCompact .sapUiCal .sapUiCalRow,
.sapUiSizeCompact.sapUiCal .sapUiCalRow{
	padding-left: 0.25rem;
	padding-right: 0.25rem;
	padding-bottom: 0.5rem;
}

.sapUiSizeCompact .sapUiCalHeadPrev,
.sapUiSizeCompact .sapUiCalHeadNext{
	width: 2rem;
}

.sapUiSizeCompact .sapUiCal .sapUiCalHeadPrev,
.sapUiSizeCompact.sapUiCal .sapUiCalHeadPrev{
	left: 0.25rem;
}

.sapUiSizeCompact .sapUiCal .sapUiCalHeadNext,
.sapUiSizeCompact.sapUiCal .sapUiCalHeadNext{
	right: 0.25rem;
}

.sapUiSizeCompact .sapUiCalHeadB{
	width: 4.25rem;
}

.sapUiSizeCompact .sapUiCalHeadBFirst{
	margin-right: 0.25rem;
}

.sapUiSizeCompact .sapUiCalHeadBLast{
	margin-left: 0.25rem;
}

.sapUiSizeCompact .sapUiCalHeadB1{
	width: 6.25rem;
}

.sapUiSizeCompact .sapUiCalMulti .sapUiCalHeadB1,
.sapUiSizeCompact.sapUiCalMulti .sapUiCalHeadB1,
.sapUiSizeCompact .sapUiCalIntLarge .sapUiCalHeadB1,
.sapUiSizeCompact.sapUiCalIntLarge .sapUiCalHeadB1,
.sapUiSizeCompact .sapUiCalMonthInt .sapUiCalHeadB2,
.sapUiSizeCompact.sapUiCalMonthInt .sapUiCalHeadB2{
	width: 12.5rem;
}

.sapUiSizeCompact .sapUiCalItem,
.sapUiSizeCompact .sapUiCalWeekNum{
	height: 2rem;
	line-height: 1.875rem;
}

.sapUiSizeCompact .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiSizeCompact .sapUiCalContent > .sapUiCalYearPicker{
	top: 0;
	padding: 2rem 0.25rem 0.5rem 0.25rem;
	margin-left: -8.25rem; /* to position in the middle (for multi-month) */
}

.sapUiSizeCompact .sapUiCalTimeInt > .sapUiCalContent > .sapUiCalDatesRow{
	margin: 0;
}

.sapUiSizeCompact .sapUiCalTimeInt > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiSizeCompact .sapUiCalTimeInt > .sapUiCalContent > .sapUiCalYearPicker,
.sapUiSizeCompact .sapUiCalMonthInt > .sapUiCalContent > .sapUiCalYearPicker{
	padding-top: 0;
}

.sapUiSizeCompact .sapUiCalInt > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiSizeCompact .sapUiCalInt > .sapUiCalContent > .sapUiCalYearPicker{
	margin-left: 0;
}

.sapUiSizeCompact .sapUiCalWidth:not(.sapUiCalInt) > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiSizeCompact.sapUiCalWidth:not(.sapUiCalInt) > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiSizeCompact .sapUiCalWidth:not(.sapUiCalInt) > .sapUiCalContent > .sapUiCalYearPicker,
.sapUiSizeCompact.sapUiCalWidth:not(.sapUiCalInt) > .sapUiCalContent > .sapUiCalYearPicker,
.sapUiSizeCompact .sapUiCalMulti > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiSizeCompact.sapUiCalMulti > .sapUiCalContent > .sapUiCalMonthPicker,
.sapUiSizeCompact .sapUiCalMulti > .sapUiCalContent > .sapUiCalYearPicker,
.sapUiSizeCompact.sapUiCalMulti > .sapUiCalContent > .sapUiCalYearPicker{
	top: 1.5rem;
	padding: 0.5rem;
	margin-left: -8.5rem;
}

/* Day names inside day */
.sapUiSizeCompact.sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem > .sapUiCalItemText,
.sapUiSizeCompact .sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem > .sapUiCalItemText{
	padding-top: 0;
	padding-left: 50%;
	line-height: inherit;
	text-align: left;
}

.sapUiSizeCompact.sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem.sapUiCalItemNow > .sapUiCalItemText,
.sapUiSizeCompact .sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem.sapUiCalItemNow > .sapUiCalItemText{
	line-height: 1.6875rem;
}

.sapUiSizeCompact.sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem > .sapUiCalDayName,
.sapUiSizeCompact .sapUiCalNoNameLine > .sapUiCalItems > .sapUiCalItem > .sapUiCalDayName{
	left: 0;
	height: 100%;
	width: 50%;
	line-height: inherit;
	padding-top: 0;
	padding-right: 0.5rem;
	text-align: right;
	box-sizing: border-box;
}

.sapUiSizeCompact .sapUiCalItemTextAmPm{
	line-height: 1.8rem;
}

/* 2 calendar types */
.sapUiSizeCompact .sapUiCalMonthSecType > .sapUiCalItems .sapUiCalItem  > .sapUiCalItemText{
	line-height: 1.5rem;
	padding-right: 0.375rem;
}

.sapUiSizeCompact .sapUiCalMonthSecType > .sapUiCalItems .sapUiCalItem.sapUiCalItemNow  > .sapUiCalItemText{
	line-height: 1.25rem;
}

.sapUiSizeCompact .sapUiCalMonthSecType > .sapUiCalItems .sapUiCalItem > .sapUiCalItemSecText{
	height: 0.75rem;
	line-height: 0.75rem;
	padding-right: 0.1875rem;
	padding-bottom: 0.1875em;
}

/*** Phone ***/
/* make calendar full-screen if on popup (DatePicker), but not if stand alone */

html.sap-phone .sapUiCal[data-sap-ui-popup]{
	position: absolute;
	top: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: auto;
	border: none;
}

html.sap-phone .sapUiCal[data-sap-ui-popup] > .sapUiCalContent > .sapUiCalMonthPicker,
html.sap-phone .sapUiCal[data-sap-ui-popup] > .sapUiCalContent > .sapUiCalYearPicker{
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding-left: 0.5rem; /* use padding instead of margin because of 100% width including padding */
	padding-right: 0.5rem;
	padding-bottom: 1rem;
}

html.sap-phone .sapUiCal[data-sap-ui-popup] > .sapUiCalCancel{
	display: block;
}

html.sap-phone .sapUiCal[data-sap-ui-popup] > .sapUiCalContent > .sapUiCalMonthPicker,
html.sap-phone .sapUiCal[data-sap-ui-popup] > .sapUiCalContent > .sapUiCalYearPicker{
	left: 0;
}